<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Deep Neural Network module</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> |
<a href="#nested-classes">Classes</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Deep Neural Network module</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:d6/d87/group__dnnLayerList"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d87/group__dnnLayerList.html">Partial List of Implemented Layers</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:df/dc1/group__dnnLayerFactory"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/dc1/group__dnnLayerFactory.html">Utilities for New Layers Registration</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/dbb/classcv_1_1dnn_1_1BackendNode.html">cv::dnn::BackendNode</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Derivatives of this class encapsulates functions of certain backends.  <a href="../../d2/dbb/classcv_1_1dnn_1_1BackendNode.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../df/d7b/classcv_1_1dnn_1_1BackendWrapper.html">cv::dnn::BackendWrapper</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Derivatives of this class wraps <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">cv::Mat</a> for different backends and targets.  <a href="../../df/d7b/classcv_1_1dnn_1_1BackendWrapper.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d0/dd5/classcv_1_1dnn_1_1ClassificationModel.html">cv::dnn::ClassificationModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for classification models.  <a href="../../d0/dd5/classcv_1_1dnn_1_1ClassificationModel.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df1/classcv_1_1dnn_1_1DetectionModel.html">cv::dnn::DetectionModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for object detection networks.  <a href="../../d3/df1/classcv_1_1dnn_1_1DetectionModel.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d9/d2b/classcv_1_1dnn_1_1Dict.html">cv::dnn::Dict</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class implements name-value dictionary, values are instances of <a class="el" href="../../d4/db3/structcv_1_1dnn_1_1DictValue.html" title="This struct stores the scalar value (or array) of one of the following type: double, cv::String or int64. ">DictValue</a>.  <a href="../../d9/d2b/classcv_1_1dnn_1_1Dict.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/db3/structcv_1_1dnn_1_1DictValue.html">cv::dnn::DictValue</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This struct stores the scalar value (or array) of one of the following type: double, <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">cv::String</a> or int64.  <a href="../../d4/db3/structcv_1_1dnn_1_1DictValue.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/ddd/classcv_1_1dnn_1_1KeypointsModel.html">cv::dnn::KeypointsModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for keypoints models.  <a href="../../db/ddd/classcv_1_1dnn_1_1KeypointsModel.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d6c/classcv_1_1dnn_1_1Layer.html">cv::dnn::Layer</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This interface class allows to build new Layers - are building blocks of networks.  <a href="../../d3/d6c/classcv_1_1dnn_1_1Layer.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/db6/classcv_1_1dnn_1_1LayerParams.html">cv::dnn::LayerParams</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class provides all data needed to initialize layer.  <a href="../../db/db6/classcv_1_1dnn_1_1LayerParams.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html">cv::dnn::Model</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class is presented high-level API for neural networks.  <a href="../../d3/df0/classcv_1_1dnn_1_1Model.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">cv::dnn::Net</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class allows to create and manipulate comprehensive artificial neural networks.  <a href="../../db/d30/classcv_1_1dnn_1_1Net.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html">cv::dnn::SegmentationModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for segmentation models.  <a href="../../da/dce/classcv_1_1dnn_1_1SegmentationModel.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d4/de1/classcv_1_1dnn_1_1TextDetectionModel.html">cv::dnn::TextDetectionModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Base class for text detection networks.  <a href="../../d4/de1/classcv_1_1dnn_1_1TextDetectionModel.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../db/d0f/classcv_1_1dnn_1_1TextDetectionModel__DB.html">cv::dnn::TextDetectionModel_DB</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for text detection DL networks compatible with DB model.  <a href="../../db/d0f/classcv_1_1dnn_1_1TextDetectionModel__DB.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d8/ddc/classcv_1_1dnn_1_1TextDetectionModel__EAST.html">cv::dnn::TextDetectionModel_EAST</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for text detection DL networks compatible with EAST model.  <a href="../../d8/ddc/classcv_1_1dnn_1_1TextDetectionModel__EAST.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td align="right" class="memItemLeft" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../de/dee/classcv_1_1dnn_1_1TextRecognitionModel.html">cv::dnn::TextRecognitionModel</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">This class represents high-level API for text recognition networks.  <a href="../../de/dee/classcv_1_1dnn_1_1TextRecognitionModel.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga5aa020953ede767d142e0adec836d7e8"><td align="right" class="memItemLeft" valign="top">typedef std::map&lt; std::string, std::vector&lt; <a class="el" href="../../d4/d67/classcv_1_1dnn_1_1LayerFactory.html#a5a9145f3c87e3f42aa74bef2b2585fa8">LayerFactory::Constructor</a> &gt; &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga5aa020953ede767d142e0adec836d7e8">cv::dnn::LayerFactory_Impl</a></td></tr>
<tr class="memdesc:ga5aa020953ede767d142e0adec836d7e8"><td class="mdescLeft"> </td><td class="mdescRight">Register layer types of DNN model.  <a href="../../d6/d0f/group__dnn.html#ga5aa020953ede767d142e0adec836d7e8">More...</a><br/></td></tr>
<tr class="separator:ga5aa020953ede767d142e0adec836d7e8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8a9ab61770c140f0fa2880c90aeae832"><td align="right" class="memItemLeft" valign="top">typedef std::vector&lt; int &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga8a9ab61770c140f0fa2880c90aeae832">cv::dnn::MatShape</a></td></tr>
<tr class="separator:ga8a9ab61770c140f0fa2880c90aeae832"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga186f7d9bfacac8b0ff2e26e2eab02625"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">cv::dnn::Backend</a> { <br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga186f7d9bfacac8b0ff2e26e2eab02625a51129aae9bc5df62a3ba95f98008717e">cv::dnn::DNN_BACKEND_DEFAULT</a> = 0, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga186f7d9bfacac8b0ff2e26e2eab02625ab066325cd703cf32062246e77dca4a76">cv::dnn::DNN_BACKEND_HALIDE</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga186f7d9bfacac8b0ff2e26e2eab02625a6d17a7450b1e077ac91faa10a1e85486">cv::dnn::DNN_BACKEND_INFERENCE_ENGINE</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga186f7d9bfacac8b0ff2e26e2eab02625a88591466239dde609ae676cec698a5b1">cv::dnn::DNN_BACKEND_OPENCV</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga186f7d9bfacac8b0ff2e26e2eab02625a91dbe681fc3246a2bd36b04e7b65122f">cv::dnn::DNN_BACKEND_VKCOM</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga186f7d9bfacac8b0ff2e26e2eab02625ab242310e1ca6b405ead9308f4b66971c">cv::dnn::DNN_BACKEND_CUDA</a>
<br/>
 }<tr class="memdesc:ga186f7d9bfacac8b0ff2e26e2eab02625"><td class="mdescLeft"> </td><td class="mdescRight">Enum of computation backends supported by layers.  <a href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ga186f7d9bfacac8b0ff2e26e2eab02625"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga709af7692ba29788182cf573531b0ff5"><td align="right" class="memItemLeft" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">cv::dnn::Target</a> { <br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5a17439f29cc1356016ed533e465b03539">cv::dnn::DNN_TARGET_CPU</a> = 0, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5a45f8ea53f004e52665078a88167c7c08">cv::dnn::DNN_TARGET_OPENCL</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5ab6d2643e6e5a3d0dfaca2ec69fd041b6">cv::dnn::DNN_TARGET_OPENCL_FP16</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5a17d5b540a9ee3ee726f181f309a223b3">cv::dnn::DNN_TARGET_MYRIAD</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5aacc0a9bdf5a6ecfca0bd6557470d5a8e">cv::dnn::DNN_TARGET_VULKAN</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5a03cfa62d77507ae5e32f8aa4e559f331">cv::dnn::DNN_TARGET_FPGA</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5a5d7e050b90e78a923d304c328d16e5f1">cv::dnn::DNN_TARGET_CUDA</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5a36a5a729e39ff249d590ea78170b6968">cv::dnn::DNN_TARGET_CUDA_FP16</a>, 
<br/>
  <a class="el" href="../../d6/d0f/group__dnn.html#gga709af7692ba29788182cf573531b0ff5ac2d885f739eec7f45de4cb7068a93292">cv::dnn::DNN_TARGET_HDDL</a>
<br/>
 }<tr class="memdesc:ga709af7692ba29788182cf573531b0ff5"><td class="mdescLeft"> </td><td class="mdescRight">Enum of target devices for computations.  <a href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">More...</a><br/></td></tr>
</td></tr>
<tr class="separator:ga709af7692ba29788182cf573531b0ff5"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga29f34df9376379a603acd8df581ac8d7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga29f34df9376379a603acd8df581ac8d7">cv::dnn::blobFromImage</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, double scalefactor=1.0, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461">mean</a>=<a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(), bool swapRB=false, bool crop=false, int ddepth=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)</td></tr>
<tr class="memdesc:ga29f34df9376379a603acd8df581ac8d7"><td class="mdescLeft"> </td><td class="mdescRight">Creates 4-dimensional blob from image. Optionally resizes and crops <code>image</code> from center, subtract <code>mean</code> values, scales values by <code>scalefactor</code>, swap Blue and Red channels.  <a href="../../d6/d0f/group__dnn.html#ga29f34df9376379a603acd8df581ac8d7">More...</a><br/></td></tr>
<tr class="separator:ga29f34df9376379a603acd8df581ac8d7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga98113a886b1d1fe0b38a8eef39ffaaa0"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga98113a886b1d1fe0b38a8eef39ffaaa0">cv::dnn::blobFromImage</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> blob, double scalefactor=1.0, const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp;size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461">mean</a>=<a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(), bool swapRB=false, bool crop=false, int ddepth=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)</td></tr>
<tr class="memdesc:ga98113a886b1d1fe0b38a8eef39ffaaa0"><td class="mdescLeft"> </td><td class="mdescRight">Creates 4-dimensional blob from image.  <a href="../../d6/d0f/group__dnn.html#ga98113a886b1d1fe0b38a8eef39ffaaa0">More...</a><br/></td></tr>
<tr class="separator:ga98113a886b1d1fe0b38a8eef39ffaaa0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0b7b7c3c530b747ef738178835e1e70f"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga0b7b7c3c530b747ef738178835e1e70f">cv::dnn::blobFromImages</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> images, double scalefactor=1.0, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461">mean</a>=<a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(), bool swapRB=false, bool crop=false, int ddepth=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)</td></tr>
<tr class="memdesc:ga0b7b7c3c530b747ef738178835e1e70f"><td class="mdescLeft"> </td><td class="mdescRight">Creates 4-dimensional blob from series of images. Optionally resizes and crops <code>images</code> from center, subtract <code>mean</code> values, scales values by <code>scalefactor</code>, swap Blue and Red channels.  <a href="../../d6/d0f/group__dnn.html#ga0b7b7c3c530b747ef738178835e1e70f">More...</a><br/></td></tr>
<tr class="separator:ga0b7b7c3c530b747ef738178835e1e70f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga2b89ed84432e4395f5a1412c2926293c"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga2b89ed84432e4395f5a1412c2926293c">cv::dnn::blobFromImages</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> images, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> blob, double scalefactor=1.0, <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> size=<a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>(), const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp;<a class="el" href="../../d2/de8/group__core__array.html#ga191389f8a0e58180bb13a727782cd461">mean</a>=<a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>(), bool swapRB=false, bool crop=false, int ddepth=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)</td></tr>
<tr class="memdesc:ga2b89ed84432e4395f5a1412c2926293c"><td class="mdescLeft"> </td><td class="mdescRight">Creates 4-dimensional blob from series of images.  <a href="../../d6/d0f/group__dnn.html#ga2b89ed84432e4395f5a1412c2926293c">More...</a><br/></td></tr>
<tr class="separator:ga2b89ed84432e4395f5a1412c2926293c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga9c06b170a462e97b413163aadb9869f9"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga9c06b170a462e97b413163aadb9869f9">cv::dnn::enableModelDiagnostics</a> (bool isDiagnosticsMode)</td></tr>
<tr class="memdesc:ga9c06b170a462e97b413163aadb9869f9"><td class="mdescLeft"> </td><td class="mdescRight">Enables detailed logging of the DNN model loading with CV DNN API.  <a href="../../d6/d0f/group__dnn.html#ga9c06b170a462e97b413163aadb9869f9">More...</a><br/></td></tr>
<tr class="separator:ga9c06b170a462e97b413163aadb9869f9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae696268ab18149507033e11531271776"><td align="right" class="memItemLeft" valign="top">std::vector&lt; std::pair&lt; <a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">Backend</a>, <a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">Target</a> &gt; &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gae696268ab18149507033e11531271776">cv::dnn::getAvailableBackends</a> ()</td></tr>
<tr class="separator:gae696268ab18149507033e11531271776"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga60c8fc10b9165cbab988c48f64d22bb4"><td align="right" class="memItemLeft" valign="top">std::vector&lt; <a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">Target</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga60c8fc10b9165cbab988c48f64d22bb4">cv::dnn::getAvailableTargets</a> (<a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">dnn::Backend</a> be)</td></tr>
<tr class="separator:ga60c8fc10b9165cbab988c48f64d22bb4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga39e5d19b673a28baa38f13f83f669568"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d6/d0f/group__dnn.html#ga5aa020953ede767d142e0adec836d7e8">LayerFactory_Impl</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga39e5d19b673a28baa38f13f83f669568">cv::dnn::getLayerFactoryImpl</a> ()</td></tr>
<tr class="separator:ga39e5d19b673a28baa38f13f83f669568"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4051b5fa2ed5f54b76c059a8625df9f5"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga4051b5fa2ed5f54b76c059a8625df9f5">cv::dnn::imagesFromBlob</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> &amp;blob_, <a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> images_)</td></tr>
<tr class="memdesc:ga4051b5fa2ed5f54b76c059a8625df9f5"><td class="mdescLeft"> </td><td class="mdescRight">Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vector&lt;cv::Mat&gt;).  <a href="../../d6/d0f/group__dnn.html#ga4051b5fa2ed5f54b76c059a8625df9f5">More...</a><br/></td></tr>
<tr class="separator:ga4051b5fa2ed5f54b76c059a8625df9f5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga9d118d70a1659af729d01b10233213ee"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee">cv::dnn::NMSBoxes</a> (const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; &amp;bboxes, const std::vector&lt; float &gt; &amp;scores, const float score_threshold, const float nms_threshold, std::vector&lt; int &gt; &amp;indices, const float eta=1.f, const int top_k=0)</td></tr>
<tr class="memdesc:ga9d118d70a1659af729d01b10233213ee"><td class="mdescLeft"> </td><td class="mdescRight">Performs non maximum suppression given boxes and corresponding scores.  <a href="../../d6/d0f/group__dnn.html#ga9d118d70a1659af729d01b10233213ee">More...</a><br/></td></tr>
<tr class="separator:ga9d118d70a1659af729d01b10233213ee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6e9e67e8d1d8b3a70b55ab9ea715e70d"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga6e9e67e8d1d8b3a70b55ab9ea715e70d">cv::dnn::NMSBoxes</a> (const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga894fe0940d40d4d65f008a2ca4e616bd">Rect2d</a> &gt; &amp;bboxes, const std::vector&lt; float &gt; &amp;scores, const float score_threshold, const float nms_threshold, std::vector&lt; int &gt; &amp;indices, const float eta=1.f, const int top_k=0)</td></tr>
<tr class="separator:ga6e9e67e8d1d8b3a70b55ab9ea715e70d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaeec27cb32195e71e6d88032bda193162"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gaeec27cb32195e71e6d88032bda193162">cv::dnn::NMSBoxes</a> (const std::vector&lt; <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> &gt; &amp;bboxes, const std::vector&lt; float &gt; &amp;scores, const float score_threshold, const float nms_threshold, std::vector&lt; int &gt; &amp;indices, const float eta=1.f, const int top_k=0)</td></tr>
<tr class="separator:gaeec27cb32195e71e6d88032bda193162"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3b34fe7a29494a6a4295c169a7d32422"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga3b34fe7a29494a6a4295c169a7d32422">cv::dnn::readNet</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;config="", const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;framework="")</td></tr>
<tr class="memdesc:ga3b34fe7a29494a6a4295c169a7d32422"><td class="mdescLeft"> </td><td class="mdescRight">Read deep learning network represented in one of the supported formats.  <a href="../../d6/d0f/group__dnn.html#ga3b34fe7a29494a6a4295c169a7d32422">More...</a><br/></td></tr>
<tr class="separator:ga3b34fe7a29494a6a4295c169a7d32422"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga138439da76f26266fdefec9723f6c5cd"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga138439da76f26266fdefec9723f6c5cd">cv::dnn::readNet</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;framework, const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferModel, const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferConfig=std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;())</td></tr>
<tr class="memdesc:ga138439da76f26266fdefec9723f6c5cd"><td class="mdescLeft"> </td><td class="mdescRight">Read deep learning network represented in one of the supported formats.  <a href="../../d6/d0f/group__dnn.html#ga138439da76f26266fdefec9723f6c5cd">More...</a><br/></td></tr>
<tr class="separator:ga138439da76f26266fdefec9723f6c5cd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga29d0ea5e52b1d1a6c2681e3f7d68473a"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga29d0ea5e52b1d1a6c2681e3f7d68473a">cv::dnn::readNetFromCaffe</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;prototxt, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;caffeModel=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:ga29d0ea5e52b1d1a6c2681e3f7d68473a"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="http://caffe.berkeleyvision.org">Caffe</a> framework's format.  <a href="../../d6/d0f/group__dnn.html#ga29d0ea5e52b1d1a6c2681e3f7d68473a">More...</a><br/></td></tr>
<tr class="separator:ga29d0ea5e52b1d1a6c2681e3f7d68473a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5b1fd56ca658f10c3bd544ea46f57164"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga5b1fd56ca658f10c3bd544ea46f57164">cv::dnn::readNetFromCaffe</a> (const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferProto, const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferModel=std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;())</td></tr>
<tr class="memdesc:ga5b1fd56ca658f10c3bd544ea46f57164"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in Caffe model in memory.  <a href="../../d6/d0f/group__dnn.html#ga5b1fd56ca658f10c3bd544ea46f57164">More...</a><br/></td></tr>
<tr class="separator:ga5b1fd56ca658f10c3bd544ea46f57164"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga946b342af1355185a7107640f868b64a"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga946b342af1355185a7107640f868b64a">cv::dnn::readNetFromCaffe</a> (const char *bufferProto, size_t lenProto, const char *bufferModel=NULL, size_t lenModel=0)</td></tr>
<tr class="memdesc:ga946b342af1355185a7107640f868b64a"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in Caffe model in memory.  <a href="../../d6/d0f/group__dnn.html#ga946b342af1355185a7107640f868b64a">More...</a><br/></td></tr>
<tr class="separator:ga946b342af1355185a7107640f868b64a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gafde362956af949cce087f3f25c6aff0d"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gafde362956af949cce087f3f25c6aff0d">cv::dnn::readNetFromDarknet</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;cfgFile, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;darknetModel=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:gafde362956af949cce087f3f25c6aff0d"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.  <a href="../../d6/d0f/group__dnn.html#gafde362956af949cce087f3f25c6aff0d">More...</a><br/></td></tr>
<tr class="separator:gafde362956af949cce087f3f25c6aff0d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaef8ac647296804e79d463d0e14af8e9d"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gaef8ac647296804e79d463d0e14af8e9d">cv::dnn::readNetFromDarknet</a> (const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferCfg, const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferModel=std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;())</td></tr>
<tr class="memdesc:gaef8ac647296804e79d463d0e14af8e9d"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.  <a href="../../d6/d0f/group__dnn.html#gaef8ac647296804e79d463d0e14af8e9d">More...</a><br/></td></tr>
<tr class="separator:gaef8ac647296804e79d463d0e14af8e9d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga351c327837e9e2d98035487695f74836"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga351c327837e9e2d98035487695f74836">cv::dnn::readNetFromDarknet</a> (const char *bufferCfg, size_t lenCfg, const char *bufferModel=NULL, size_t lenModel=0)</td></tr>
<tr class="memdesc:ga351c327837e9e2d98035487695f74836"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files.  <a href="../../d6/d0f/group__dnn.html#ga351c327837e9e2d98035487695f74836">More...</a><br/></td></tr>
<tr class="separator:ga351c327837e9e2d98035487695f74836"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4f3b552113d2bff48a54e168791c448e"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga4f3b552113d2bff48a54e168791c448e">cv::dnn::readNetFromModelOptimizer</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;xml, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;bin)</td></tr>
<tr class="memdesc:ga4f3b552113d2bff48a54e168791c448e"><td class="mdescLeft"> </td><td class="mdescRight">Load a network from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer intermediate representation.  <a href="../../d6/d0f/group__dnn.html#ga4f3b552113d2bff48a54e168791c448e">More...</a><br/></td></tr>
<tr class="separator:ga4f3b552113d2bff48a54e168791c448e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac3e76ebe0ac85f45144823be699c2023"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gac3e76ebe0ac85f45144823be699c2023">cv::dnn::readNetFromModelOptimizer</a> (const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferModelConfig, const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferWeights)</td></tr>
<tr class="memdesc:gac3e76ebe0ac85f45144823be699c2023"><td class="mdescLeft"> </td><td class="mdescRight">Load a network from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer intermediate representation.  <a href="../../d6/d0f/group__dnn.html#gac3e76ebe0ac85f45144823be699c2023">More...</a><br/></td></tr>
<tr class="separator:gac3e76ebe0ac85f45144823be699c2023"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad2c5afab20a751d5ac2a587d607023d0"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gad2c5afab20a751d5ac2a587d607023d0">cv::dnn::readNetFromModelOptimizer</a> (const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *bufferModelConfigPtr, size_t bufferModelConfigSize, const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> *bufferWeightsPtr, size_t bufferWeightsSize)</td></tr>
<tr class="memdesc:gad2c5afab20a751d5ac2a587d607023d0"><td class="mdescLeft"> </td><td class="mdescRight">Load a network from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer intermediate representation.  <a href="../../d6/d0f/group__dnn.html#gad2c5afab20a751d5ac2a587d607023d0">More...</a><br/></td></tr>
<tr class="separator:gad2c5afab20a751d5ac2a587d607023d0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga7faea56041d10c71dbbd6746ca854197"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga7faea56041d10c71dbbd6746ca854197">cv::dnn::readNetFromONNX</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;onnxFile)</td></tr>
<tr class="memdesc:ga7faea56041d10c71dbbd6746ca854197"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model <a href="https://onnx.ai/">ONNX</a>.  <a href="../../d6/d0f/group__dnn.html#ga7faea56041d10c71dbbd6746ca854197">More...</a><br/></td></tr>
<tr class="separator:ga7faea56041d10c71dbbd6746ca854197"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga9198ecaac7c32ddf0aa7a1bcbd359567"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga9198ecaac7c32ddf0aa7a1bcbd359567">cv::dnn::readNetFromONNX</a> (const char *buffer, size_t sizeBuffer)</td></tr>
<tr class="memdesc:ga9198ecaac7c32ddf0aa7a1bcbd359567"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer.  <a href="../../d6/d0f/group__dnn.html#ga9198ecaac7c32ddf0aa7a1bcbd359567">More...</a><br/></td></tr>
<tr class="separator:ga9198ecaac7c32ddf0aa7a1bcbd359567"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac1a00e8bae54070e5837c15b1482997d"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gac1a00e8bae54070e5837c15b1482997d">cv::dnn::readNetFromONNX</a> (const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;buffer)</td></tr>
<tr class="memdesc:gac1a00e8bae54070e5837c15b1482997d"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer.  <a href="../../d6/d0f/group__dnn.html#gac1a00e8bae54070e5837c15b1482997d">More...</a><br/></td></tr>
<tr class="separator:gac1a00e8bae54070e5837c15b1482997d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad820b280978d06773234ba6841e77e8d"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gad820b280978d06773234ba6841e77e8d">cv::dnn::readNetFromTensorflow</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;config=<a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>())</td></tr>
<tr class="memdesc:gad820b280978d06773234ba6841e77e8d"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.  <a href="../../d6/d0f/group__dnn.html#gad820b280978d06773234ba6841e77e8d">More...</a><br/></td></tr>
<tr class="separator:gad820b280978d06773234ba6841e77e8d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac9b3890caab2f84790a17b306f36bd57"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gac9b3890caab2f84790a17b306f36bd57">cv::dnn::readNetFromTensorflow</a> (const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferModel, const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp;bufferConfig=std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;())</td></tr>
<tr class="memdesc:gac9b3890caab2f84790a17b306f36bd57"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.  <a href="../../d6/d0f/group__dnn.html#gac9b3890caab2f84790a17b306f36bd57">More...</a><br/></td></tr>
<tr class="separator:gac9b3890caab2f84790a17b306f36bd57"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gacdba30a7c20db2788efbf5bb16a7884d"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#gacdba30a7c20db2788efbf5bb16a7884d">cv::dnn::readNetFromTensorflow</a> (const char *bufferModel, size_t lenModel, const char *bufferConfig=NULL, size_t lenConfig=0)</td></tr>
<tr class="memdesc:gacdba30a7c20db2788efbf5bb16a7884d"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format.  <a href="../../d6/d0f/group__dnn.html#gacdba30a7c20db2788efbf5bb16a7884d">More...</a><br/></td></tr>
<tr class="separator:gacdba30a7c20db2788efbf5bb16a7884d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga65a1da76cb7d6852bdf7abbd96f19084"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga65a1da76cb7d6852bdf7abbd96f19084">cv::dnn::readNetFromTorch</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model, bool isBinary=true, bool evaluate=true)</td></tr>
<tr class="memdesc:ga65a1da76cb7d6852bdf7abbd96f19084"><td class="mdescLeft"> </td><td class="mdescRight">Reads a network model stored in <a href="http://torch.ch">Torch7</a> framework's format.  <a href="../../d6/d0f/group__dnn.html#ga65a1da76cb7d6852bdf7abbd96f19084">More...</a><br/></td></tr>
<tr class="separator:ga65a1da76cb7d6852bdf7abbd96f19084"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga8fe873b1b4746c3ceee80bebb16605d5"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga8fe873b1b4746c3ceee80bebb16605d5">cv::dnn::readTensorFromONNX</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;path)</td></tr>
<tr class="memdesc:ga8fe873b1b4746c3ceee80bebb16605d5"><td class="mdescLeft"> </td><td class="mdescRight">Creates blob from .pb file.  <a href="../../d6/d0f/group__dnn.html#ga8fe873b1b4746c3ceee80bebb16605d5">More...</a><br/></td></tr>
<tr class="separator:ga8fe873b1b4746c3ceee80bebb16605d5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga70a86067eed7e495865cedc175ddba09"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga70a86067eed7e495865cedc175ddba09">cv::dnn::readTorchBlob</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;filename, bool isBinary=true)</td></tr>
<tr class="memdesc:ga70a86067eed7e495865cedc175ddba09"><td class="mdescLeft"> </td><td class="mdescRight">Loads blob which was serialized as torch.Tensor object of Torch7 framework.  <a href="../../d6/d0f/group__dnn.html#ga70a86067eed7e495865cedc175ddba09">More...</a><br/></td></tr>
<tr class="separator:ga70a86067eed7e495865cedc175ddba09"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga5de8769f48b44f631c1767b1700069fa"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga5de8769f48b44f631c1767b1700069fa">cv::dnn::shrinkCaffeModel</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;src, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;dst, const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &gt; &amp;layersTypes=std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &gt;())</td></tr>
<tr class="memdesc:ga5de8769f48b44f631c1767b1700069fa"><td class="mdescLeft"> </td><td class="mdescRight">Convert all weights of Caffe network to half precision floating point.  <a href="../../d6/d0f/group__dnn.html#ga5de8769f48b44f631c1767b1700069fa">More...</a><br/></td></tr>
<tr class="separator:ga5de8769f48b44f631c1767b1700069fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0c3f216f5f858efdef44b68636133dff"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d6/d0f/group__dnn.html#ga0c3f216f5f858efdef44b68636133dff">cv::dnn::writeTextGraph</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;model, const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp;output)</td></tr>
<tr class="memdesc:ga0c3f216f5f858efdef44b68636133dff"><td class="mdescLeft"> </td><td class="mdescRight">Create a text representation for a binary network stored in protocol buffer format.  <a href="../../d6/d0f/group__dnn.html#ga0c3f216f5f858efdef44b68636133dff">More...</a><br/></td></tr>
<tr class="separator:ga0c3f216f5f858efdef44b68636133dff"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This module contains:</p><ul>
<li>API for new layers creation, layers are building bricks of neural networks;</li>
<li>set of built-in most-useful Layers;</li>
<li>API to construct and modify comprehensive neural networks from layers;</li>
<li>functionality for loading serialized networks models from different frameworks.</li>
</ul>
<p>Functionality of this module is designed only for forward pass computations (i.e. network testing). A network training is in principle not supported. </p>
<h2 class="groupheader">Typedef Documentation</h2>
<a id="ga5aa020953ede767d142e0adec836d7e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5aa020953ede767d142e0adec836d7e8">◆ </a></span>LayerFactory_Impl</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::map&lt;std::string, std::vector&lt;<a class="el" href="../../d4/d67/classcv_1_1dnn_1_1LayerFactory.html#a5a9145f3c87e3f42aa74bef2b2585fa8">LayerFactory::Constructor</a>&gt; &gt; <a class="el" href="../../d6/d0f/group__dnn.html#ga5aa020953ede767d142e0adec836d7e8">cv::dnn::LayerFactory_Impl</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d7e/layer__reg_8private_8hpp.html">opencv2/dnn/layer_reg.private.hpp</a>&gt;</code></p>
<p>Register layer types of DNN model. </p>
</div>
</div>
<a id="ga8a9ab61770c140f0fa2880c90aeae832"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8a9ab61770c140f0fa2880c90aeae832">◆ </a></span>MatShape</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef std::vector&lt;int&gt; <a class="el" href="../../d6/d0f/group__dnn.html#ga8a9ab61770c140f0fa2880c90aeae832">cv::dnn::MatShape</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga186f7d9bfacac8b0ff2e26e2eab02625"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga186f7d9bfacac8b0ff2e26e2eab02625">◆ </a></span>Backend</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">cv::dnn::Backend</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Enum of computation backends supported by layers. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html#a7f767df11386d39374db49cd8df8f59e" title="Ask network to use specific computation backend where it supported. ">Net::setPreferableBackend</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga186f7d9bfacac8b0ff2e26e2eab02625a51129aae9bc5df62a3ba95f98008717e"></a>DNN_BACKEND_DEFAULT <div class="python_language">Python: cv.dnn.DNN_BACKEND_DEFAULT</div></td><td class="fielddoc"><p>DNN_BACKEND_DEFAULT equals to DNN_BACKEND_INFERENCE_ENGINE if OpenCV is built with Intel's Inference Engine library or DNN_BACKEND_OPENCV otherwise. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga186f7d9bfacac8b0ff2e26e2eab02625ab066325cd703cf32062246e77dca4a76"></a>DNN_BACKEND_HALIDE <div class="python_language">Python: cv.dnn.DNN_BACKEND_HALIDE</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga186f7d9bfacac8b0ff2e26e2eab02625a6d17a7450b1e077ac91faa10a1e85486"></a>DNN_BACKEND_INFERENCE_ENGINE <div class="python_language">Python: cv.dnn.DNN_BACKEND_INFERENCE_ENGINE</div></td><td class="fielddoc"><p>Intel's Inference Engine computational backend </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="../../df/d57/namespacecv_1_1dnn.html#a9caa7da18447ff7850ca962706482ec7" title="Specify Inference Engine internal backend API. ">setInferenceEngineBackendType</a> </dd></dl>
</td></tr>
<tr><td class="fieldname"><a id="gga186f7d9bfacac8b0ff2e26e2eab02625a88591466239dde609ae676cec698a5b1"></a>DNN_BACKEND_OPENCV <div class="python_language">Python: cv.dnn.DNN_BACKEND_OPENCV</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga186f7d9bfacac8b0ff2e26e2eab02625a91dbe681fc3246a2bd36b04e7b65122f"></a>DNN_BACKEND_VKCOM <div class="python_language">Python: cv.dnn.DNN_BACKEND_VKCOM</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga186f7d9bfacac8b0ff2e26e2eab02625ab242310e1ca6b405ead9308f4b66971c"></a>DNN_BACKEND_CUDA <div class="python_language">Python: cv.dnn.DNN_BACKEND_CUDA</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<a id="ga709af7692ba29788182cf573531b0ff5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga709af7692ba29788182cf573531b0ff5">◆ </a></span>Target</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">cv::dnn::Target</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Enum of target devices for computations. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html#a9dddbefbc7f3defbe3eeb5dc3d3483f4" title="Ask network to make computations on specific target device. ">Net::setPreferableTarget</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5a17439f29cc1356016ed533e465b03539"></a>DNN_TARGET_CPU <div class="python_language">Python: cv.dnn.DNN_TARGET_CPU</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5a45f8ea53f004e52665078a88167c7c08"></a>DNN_TARGET_OPENCL <div class="python_language">Python: cv.dnn.DNN_TARGET_OPENCL</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5ab6d2643e6e5a3d0dfaca2ec69fd041b6"></a>DNN_TARGET_OPENCL_FP16 <div class="python_language">Python: cv.dnn.DNN_TARGET_OPENCL_FP16</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5a17d5b540a9ee3ee726f181f309a223b3"></a>DNN_TARGET_MYRIAD <div class="python_language">Python: cv.dnn.DNN_TARGET_MYRIAD</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5aacc0a9bdf5a6ecfca0bd6557470d5a8e"></a>DNN_TARGET_VULKAN <div class="python_language">Python: cv.dnn.DNN_TARGET_VULKAN</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5a03cfa62d77507ae5e32f8aa4e559f331"></a>DNN_TARGET_FPGA <div class="python_language">Python: cv.dnn.DNN_TARGET_FPGA</div></td><td class="fielddoc"><p>FPGA device with CPU fallbacks using Inference Engine's Heterogeneous plugin. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5a5d7e050b90e78a923d304c328d16e5f1"></a>DNN_TARGET_CUDA <div class="python_language">Python: cv.dnn.DNN_TARGET_CUDA</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5a36a5a729e39ff249d590ea78170b6968"></a>DNN_TARGET_CUDA_FP16 <div class="python_language">Python: cv.dnn.DNN_TARGET_CUDA_FP16</div></td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="gga709af7692ba29788182cf573531b0ff5ac2d885f739eec7f45de4cb7068a93292"></a>DNN_TARGET_HDDL <div class="python_language">Python: cv.dnn.DNN_TARGET_HDDL</div></td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga29f34df9376379a603acd8df581ac8d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29f34df9376379a603acd8df581ac8d7">◆ </a></span>blobFromImage() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::dnn::blobFromImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scalefactor</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>mean</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>swapRB</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>crop</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.blobFromImage(</td><td class="paramname">image[, scalefactor[, size[, mean[, swapRB[, crop[, ddepth]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Creates 4-dimensional blob from image. Optionally resizes and crops <code>image</code> from center, subtract <code>mean</code> values, scales values by <code>scalefactor</code>, swap Blue and Red channels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>input image (with 1-, 3- or 4-channels). </td></tr>
    <tr><td class="paramname">size</td><td>spatial size for output image </td></tr>
    <tr><td class="paramname">mean</td><td>scalar with mean values which are subtracted from channels. Values are intended to be in (mean-R, mean-G, mean-B) order if <code>image</code> has BGR ordering and <code>swapRB</code> is true. </td></tr>
    <tr><td class="paramname">scalefactor</td><td>multiplier for <code>image</code> values. </td></tr>
    <tr><td class="paramname">swapRB</td><td>flag which indicates that swap first and last channels in 3-channel image is necessary. </td></tr>
    <tr><td class="paramname">crop</td><td>flag which indicates whether image will be cropped after resize or not </td></tr>
    <tr><td class="paramname">ddepth</td><td>Depth of output blob. Choose CV_32F or CV_8U.</td></tr>
  </table>
  </dd>
</dl>
<p>if <code>crop</code> is true, input image is resized so one side after resize is equal to corresponding dimension in <code>size</code> and another one is equal or larger. Then, crop from the center is performed. If <code>crop</code> is false, direct resize without cropping and preserving aspect ratio is performed. </p><dl class="section return"><dt>Returns</dt><dd>4-dimensional <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> with NCHW dimensions order. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/d8d/samples_2dnn_2classification_8cpp-example.html#a25">samples/dnn/classification.cpp</a>, <a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#a19">samples/dnn/colorization.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a36">samples/dnn/object_detection.cpp</a>, <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a10">samples/dnn/openpose.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a17">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga98113a886b1d1fe0b38a8eef39ffaaa0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga98113a886b1d1fe0b38a8eef39ffaaa0">◆ </a></span>blobFromImage() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::blobFromImage </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>blob</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scalefactor</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> &amp; </td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>mean</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>swapRB</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>crop</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.blobFromImage(</td><td class="paramname">image[, scalefactor[, size[, mean[, swapRB[, crop[, ddepth]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Creates 4-dimensional blob from image. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga0b7b7c3c530b747ef738178835e1e70f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0b7b7c3c530b747ef738178835e1e70f">◆ </a></span>blobFromImages() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::dnn::blobFromImages </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>images</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scalefactor</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> </td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>mean</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>swapRB</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>crop</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.blobFromImages(</td><td class="paramname">images[, scalefactor[, size[, mean[, swapRB[, crop[, ddepth]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Creates 4-dimensional blob from series of images. Optionally resizes and crops <code>images</code> from center, subtract <code>mean</code> values, scales values by <code>scalefactor</code>, swap Blue and Red channels. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">images</td><td>input images (all with 1-, 3- or 4-channels). </td></tr>
    <tr><td class="paramname">size</td><td>spatial size for output image </td></tr>
    <tr><td class="paramname">mean</td><td>scalar with mean values which are subtracted from channels. Values are intended to be in (mean-R, mean-G, mean-B) order if <code>image</code> has BGR ordering and <code>swapRB</code> is true. </td></tr>
    <tr><td class="paramname">scalefactor</td><td>multiplier for <code>images</code> values. </td></tr>
    <tr><td class="paramname">swapRB</td><td>flag which indicates that swap first and last channels in 3-channel image is necessary. </td></tr>
    <tr><td class="paramname">crop</td><td>flag which indicates whether image will be cropped after resize or not </td></tr>
    <tr><td class="paramname">ddepth</td><td>Depth of output blob. Choose CV_32F or CV_8U.</td></tr>
  </table>
  </dd>
</dl>
<p>if <code>crop</code> is true, input image is resized so one side after resize is equal to corresponding dimension in <code>size</code> and another one is equal or larger. Then, crop from the center is performed. If <code>crop</code> is false, direct resize without cropping and preserving aspect ratio is performed. </p><dl class="section return"><dt>Returns</dt><dd>4-dimensional <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> with NCHW dimensions order. </dd></dl>
</div>
</div>
<a id="ga2b89ed84432e4395f5a1412c2926293c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2b89ed84432e4395f5a1412c2926293c">◆ </a></span>blobFromImages() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::blobFromImages </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>images</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>blob</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>scalefactor</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a> </td>
          <td class="paramname"><em>size</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga346f563897249351a34549137c8532a0">Size</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a> &amp; </td>
          <td class="paramname"><em>mean</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga599fe92e910c027be274233eccad7beb">Scalar</a>()</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>swapRB</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>crop</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>ddepth</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.blobFromImages(</td><td class="paramname">images[, scalefactor[, size[, mean[, swapRB[, crop[, ddepth]]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Creates 4-dimensional blob from series of images. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="ga9c06b170a462e97b413163aadb9869f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c06b170a462e97b413163aadb9869f9">◆ </a></span>enableModelDiagnostics()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::enableModelDiagnostics </td>
          <td>(</td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>isDiagnosticsMode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Enables detailed logging of the DNN model loading with CV DNN API. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">isDiagnosticsMode</td><td>Indicates whether diagnostic mode should be set.</td></tr>
  </table>
  </dd>
</dl>
<p>Diagnostic mode provides detailed logging of the model loading stage to explore potential problems (ex.: not implemented layer type).</p>
<dl class="section note"><dt>Note</dt><dd>In diagnostic mode series of assertions will be skipped, it can lead to the expected application crash. </dd></dl>
</div>
</div>
<a id="gae696268ab18149507033e11531271776"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae696268ab18149507033e11531271776">◆ </a></span>getAvailableBackends()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::pair&lt;<a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">Backend</a>, <a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">Target</a>&gt; &gt; cv::dnn::getAvailableBackends </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga60c8fc10b9165cbab988c48f64d22bb4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga60c8fc10b9165cbab988c48f64d22bb4">◆ </a></span>getAvailableTargets()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="../../d6/d0f/group__dnn.html#ga709af7692ba29788182cf573531b0ff5">Target</a>&gt; cv::dnn::getAvailableTargets </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../d6/d0f/group__dnn.html#ga186f7d9bfacac8b0ff2e26e2eab02625">dnn::Backend</a> </td>
          <td class="paramname"><em>be</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.getAvailableTargets(</td><td class="paramname">be</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga39e5d19b673a28baa38f13f83f669568"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga39e5d19b673a28baa38f13f83f669568">◆ </a></span>getLayerFactoryImpl()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d6/d0f/group__dnn.html#ga5aa020953ede767d142e0adec836d7e8">LayerFactory_Impl</a>&amp; cv::dnn::getLayerFactoryImpl </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d0/d7e/layer__reg_8private_8hpp.html">opencv2/dnn/layer_reg.private.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga4051b5fa2ed5f54b76c059a8625df9f5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4051b5fa2ed5f54b76c059a8625df9f5">◆ </a></span>imagesFromBlob()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::imagesFromBlob </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">cv::Mat</a> &amp; </td>
          <td class="paramname"><em>blob_</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga889a09549b98223016170d9b613715de">OutputArrayOfArrays</a> </td>
          <td class="paramname"><em>images_</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>images_</td><td>=</td><td>cv.dnn.imagesFromBlob(</td><td class="paramname">blob_[, images_]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Parse a 4D blob and output the images it contains as 2D arrays through a simpler data structure (std::vector&lt;cv::Mat&gt;). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">blob_</td><td>4 dimensional array (images, channels, height, width) in floating point precision (CV_32F) from which you would like to extract the images. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">images_</td><td>array of 2D <a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a> containing the images extracted from the blob in floating point precision (CV_32F). They are non normalized neither mean added. The number of returned images equals the first dimension of the blob (batch size). Every image has a number of channels equals to the second dimension of the blob (depth). </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga9d118d70a1659af729d01b10233213ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9d118d70a1659af729d01b10233213ee">◆ </a></span>NMSBoxes() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::NMSBoxes </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga11d95de507098e90bad732b9345402e8">Rect</a> &gt; &amp; </td>
          <td class="paramname"><em>bboxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp; </td>
          <td class="paramname"><em>scores</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>score_threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>nms_threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>eta</em> = <code>1.f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int </td>
          <td class="paramname"><em>top_k</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>indices</td><td>=</td><td>cv.dnn.NMSBoxes(</td><td class="paramname">bboxes, scores, score_threshold, nms_threshold[, eta[, top_k]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>indices</td><td>=</td><td>cv.dnn.NMSBoxesRotated(</td><td class="paramname">bboxes, scores, score_threshold, nms_threshold[, eta[, top_k]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Performs non maximum suppression given boxes and corresponding scores. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bboxes</td><td>a set of bounding boxes to apply NMS. </td></tr>
    <tr><td class="paramname">scores</td><td>a set of corresponding confidences. </td></tr>
    <tr><td class="paramname">score_threshold</td><td>a threshold used to filter boxes by score. </td></tr>
    <tr><td class="paramname">nms_threshold</td><td>a threshold used in non maximum suppression. </td></tr>
    <tr><td class="paramname">indices</td><td>the kept indices of bboxes after NMS. </td></tr>
    <tr><td class="paramname">eta</td><td>a coefficient in adaptive threshold formula: \(nms\_threshold_{i+1}=eta\cdot nms\_threshold_i\). </td></tr>
    <tr><td class="paramname">top_k</td><td>if <code>&gt;0</code>, keep at most <code>top_k</code> picked indices. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a45">samples/dnn/object_detection.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga6e9e67e8d1d8b3a70b55ab9ea715e70d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6e9e67e8d1d8b3a70b55ab9ea715e70d">◆ </a></span>NMSBoxes() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::NMSBoxes </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga894fe0940d40d4d65f008a2ca4e616bd">Rect2d</a> &gt; &amp; </td>
          <td class="paramname"><em>bboxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp; </td>
          <td class="paramname"><em>scores</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>score_threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>nms_threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>eta</em> = <code>1.f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int </td>
          <td class="paramname"><em>top_k</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>indices</td><td>=</td><td>cv.dnn.NMSBoxes(</td><td class="paramname">bboxes, scores, score_threshold, nms_threshold[, eta[, top_k]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>indices</td><td>=</td><td>cv.dnn.NMSBoxesRotated(</td><td class="paramname">bboxes, scores, score_threshold, nms_threshold[, eta[, top_k]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
</div>
</div>
<a id="gaeec27cb32195e71e6d88032bda193162"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeec27cb32195e71e6d88032bda193162">◆ </a></span>NMSBoxes() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::NMSBoxes </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../db/dd6/classcv_1_1RotatedRect.html">RotatedRect</a> &gt; &amp; </td>
          <td class="paramname"><em>bboxes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp; </td>
          <td class="paramname"><em>scores</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>score_threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>nms_threshold</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; int &gt; &amp; </td>
          <td class="paramname"><em>indices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float </td>
          <td class="paramname"><em>eta</em> = <code>1.f</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int </td>
          <td class="paramname"><em>top_k</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>indices</td><td>=</td><td>cv.dnn.NMSBoxes(</td><td class="paramname">bboxes, scores, score_threshold, nms_threshold[, eta[, top_k]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>indices</td><td>=</td><td>cv.dnn.NMSBoxesRotated(</td><td class="paramname">bboxes, scores, score_threshold, nms_threshold[, eta[, top_k]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
</div>
</div>
<a id="ga3b34fe7a29494a6a4295c169a7d32422"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3b34fe7a29494a6a4295c169a7d32422">◆ </a></span>readNet() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>config</em> = <code>""</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>framework</em> = <code>""</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNet(</td><td class="paramname">model[, config[, framework]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNet(</td><td class="paramname">framework, bufferModel[, bufferConfig]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Read deep learning network represented in one of the supported formats. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>Binary file contains trained weights. The following file extensions are expected for models from different frameworks:<ul>
<li><code>*.caffemodel</code> (Caffe, <a href="http://caffe.berkeleyvision.org/">http://caffe.berkeleyvision.org/</a>)</li>
<li><code>*.pb</code> (TensorFlow, <a href="https://www.tensorflow.org/">https://www.tensorflow.org/</a>)</li>
<li><code>*.t7</code> | <code>*.net</code> (Torch, <a href="http://torch.ch/">http://torch.ch/</a>)</li>
<li><code>*.weights</code> (Darknet, <a href="https://pjreddie.com/darknet/">https://pjreddie.com/darknet/</a>)</li>
<li><code>*.bin</code> (DLDT, <a href="https://software.intel.com/openvino-toolkit">https://software.intel.com/openvino-toolkit</a>)</li>
<li><code>*.onnx</code> (ONNX, <a href="https://onnx.ai/">https://onnx.ai/</a>) </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">config</td><td>Text file contains network configuration. It could be a file with the following extensions:<ul>
<li><code>*.prototxt</code> (Caffe, <a href="http://caffe.berkeleyvision.org/">http://caffe.berkeleyvision.org/</a>)</li>
<li><code>*.pbtxt</code> (TensorFlow, <a href="https://www.tensorflow.org/">https://www.tensorflow.org/</a>)</li>
<li><code>*.cfg</code> (Darknet, <a href="https://pjreddie.com/darknet/">https://pjreddie.com/darknet/</a>)</li>
<li><code>*.xml</code> (DLDT, <a href="https://software.intel.com/openvino-toolkit">https://software.intel.com/openvino-toolkit</a>) </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">framework</td><td>Explicit framework name tag to determine a format. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object.</dd></dl>
<p>This function automatically detects an origin framework of trained model and calls an appropriate function such <a class="el" href="../../d6/d0f/group__dnn.html#ga29d0ea5e52b1d1a6c2681e3f7d68473a">readNetFromCaffe</a>, <a class="el" href="../../d6/d0f/group__dnn.html#gad820b280978d06773234ba6841e77e8d">readNetFromTensorflow</a>, <a class="el" href="../../d6/d0f/group__dnn.html#ga65a1da76cb7d6852bdf7abbd96f19084">readNetFromTorch</a> or <a class="el" href="../../d6/d0f/group__dnn.html#gafde362956af949cce087f3f25c6aff0d">readNetFromDarknet</a>. An order of <code>model</code> and <code>config</code> arguments does not matter. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d9/d8d/samples_2dnn_2classification_8cpp-example.html#a16">samples/dnn/classification.cpp</a>, <a class="el" href="../../d4/db9/samples_2dnn_2object_detection_8cpp-example.html#a14">samples/dnn/object_detection.cpp</a>, <a class="el" href="../../d7/d4f/samples_2dnn_2openpose_8cpp-example.html#a6">samples/dnn/openpose.cpp</a>, and <a class="el" href="../../d4/d88/samples_2dnn_2segmentation_8cpp-example.html#a11">samples/dnn/segmentation.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga138439da76f26266fdefec9723f6c5cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga138439da76f26266fdefec9723f6c5cd">◆ </a></span>readNet() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>framework</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferModel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferConfig</em> = <code>std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNet(</td><td class="paramname">model[, config[, framework]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNet(</td><td class="paramname">framework, bufferModel[, bufferConfig]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Read deep learning network represented in one of the supported formats. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">framework</td><td>Name of origin framework. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferModel</td><td>A buffer with a content of binary file with weights </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferConfig</td><td>A buffer with a content of text file contains network configuration. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="ga29d0ea5e52b1d1a6c2681e3f7d68473a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga29d0ea5e52b1d1a6c2681e3f7d68473a">◆ </a></span>readNetFromCaffe() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromCaffe </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>prototxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>caffeModel</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromCaffe(</td><td class="paramname">prototxt[, caffeModel]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromCaffe(</td><td class="paramname">bufferProto[, bufferModel]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="http://caffe.berkeleyvision.org">Caffe</a> framework's format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">prototxt</td><td>path to the .prototxt file with text description of the network architecture. </td></tr>
    <tr><td class="paramname">caffeModel</td><td>path to the .caffemodel file with learned network. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../d6/d39/samples_2dnn_2colorization_8cpp-example.html#a7">samples/dnn/colorization.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ga5b1fd56ca658f10c3bd544ea46f57164"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5b1fd56ca658f10c3bd544ea46f57164">◆ </a></span>readNetFromCaffe() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromCaffe </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferProto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferModel</em> = <code>std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromCaffe(</td><td class="paramname">prototxt[, caffeModel]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromCaffe(</td><td class="paramname">bufferProto[, bufferModel]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in Caffe model in memory. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bufferProto</td><td>buffer containing the content of the .prototxt file </td></tr>
    <tr><td class="paramname">bufferModel</td><td>buffer containing the content of the .caffemodel file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="ga946b342af1355185a7107640f868b64a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga946b342af1355185a7107640f868b64a">◆ </a></span>readNetFromCaffe() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromCaffe </td>
          <td>(</td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>bufferProto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>lenProto</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>bufferModel</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>lenModel</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromCaffe(</td><td class="paramname">prototxt[, caffeModel]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromCaffe(</td><td class="paramname">bufferProto[, bufferModel]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in Caffe model in memory. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bufferProto</td><td>buffer containing the content of the .prototxt file </td></tr>
    <tr><td class="paramname">lenProto</td><td>length of bufferProto </td></tr>
    <tr><td class="paramname">bufferModel</td><td>buffer containing the content of the .caffemodel file </td></tr>
    <tr><td class="paramname">lenModel</td><td>length of bufferModel </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="gafde362956af949cce087f3f25c6aff0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafde362956af949cce087f3f25c6aff0d">◆ </a></span>readNetFromDarknet() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromDarknet </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>cfgFile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>darknetModel</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromDarknet(</td><td class="paramname">cfgFile[, darknetModel]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromDarknet(</td><td class="paramname">bufferCfg[, bufferModel]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cfgFile</td><td>path to the .cfg file with text description of the network architecture. </td></tr>
    <tr><td class="paramname">darknetModel</td><td>path to the .weights file with learned network. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Network object that ready to do forward, throw an exception in failure cases. </dd>
<dd>
<a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="gaef8ac647296804e79d463d0e14af8e9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaef8ac647296804e79d463d0e14af8e9d">◆ </a></span>readNetFromDarknet() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromDarknet </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferCfg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferModel</em> = <code>std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromDarknet(</td><td class="paramname">cfgFile[, darknetModel]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromDarknet(</td><td class="paramname">bufferCfg[, bufferModel]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bufferCfg</td><td>A buffer contains a content of .cfg file with text description of the network architecture. </td></tr>
    <tr><td class="paramname">bufferModel</td><td>A buffer contains a content of .weights file with learned network. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="ga351c327837e9e2d98035487695f74836"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga351c327837e9e2d98035487695f74836">◆ </a></span>readNetFromDarknet() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromDarknet </td>
          <td>(</td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>bufferCfg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>lenCfg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>bufferModel</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>lenModel</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromDarknet(</td><td class="paramname">cfgFile[, darknetModel]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromDarknet(</td><td class="paramname">bufferCfg[, bufferModel]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="https://pjreddie.com/darknet/">Darknet</a> model files. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bufferCfg</td><td>A buffer contains a content of .cfg file with text description of the network architecture. </td></tr>
    <tr><td class="paramname">lenCfg</td><td>Number of bytes to read from bufferCfg </td></tr>
    <tr><td class="paramname">bufferModel</td><td>A buffer contains a content of .weights file with learned network. </td></tr>
    <tr><td class="paramname">lenModel</td><td>Number of bytes to read from bufferModel </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="ga4f3b552113d2bff48a54e168791c448e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4f3b552113d2bff48a54e168791c448e">◆ </a></span>readNetFromModelOptimizer() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromModelOptimizer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>xml</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>bin</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromModelOptimizer(</td><td class="paramname">xml, bin</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromModelOptimizer(</td><td class="paramname">bufferModelConfig, bufferWeights</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Load a network from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer intermediate representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">xml</td><td>XML configuration file with network's topology. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bin</td><td>Binary file with trained weights. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. Networks imported from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer are launched in Intel's Inference Engine backend. </dd></dl>
</div>
</div>
<a id="gac3e76ebe0ac85f45144823be699c2023"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac3e76ebe0ac85f45144823be699c2023">◆ </a></span>readNetFromModelOptimizer() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromModelOptimizer </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferModelConfig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferWeights</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromModelOptimizer(</td><td class="paramname">xml, bin</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromModelOptimizer(</td><td class="paramname">bufferModelConfig, bufferWeights</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Load a network from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer intermediate representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferModelConfig</td><td>Buffer contains XML configuration with network's topology. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferWeights</td><td>Buffer contains binary data with trained weights. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. Networks imported from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer are launched in Intel's Inference Engine backend. </dd></dl>
</div>
</div>
<a id="gad2c5afab20a751d5ac2a587d607023d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad2c5afab20a751d5ac2a587d607023d0">◆ </a></span>readNetFromModelOptimizer() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromModelOptimizer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> * </td>
          <td class="paramname"><em>bufferModelConfigPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>bufferModelConfigSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> * </td>
          <td class="paramname"><em>bufferWeightsPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>bufferWeightsSize</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromModelOptimizer(</td><td class="paramname">xml, bin</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromModelOptimizer(</td><td class="paramname">bufferModelConfig, bufferWeights</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Load a network from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer intermediate representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferModelConfigPtr</td><td>Pointer to buffer which contains XML configuration with network's topology. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferModelConfigSize</td><td>Binary size of XML configuration data. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferWeightsPtr</td><td>Pointer to buffer which contains binary data with trained weights. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">bufferWeightsSize</td><td>Binary size of trained weights data. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. Networks imported from Intel's <a class="el" href="../../d3/df0/classcv_1_1dnn_1_1Model.html" title="This class is presented high-level API for neural networks. ">Model</a> Optimizer are launched in Intel's Inference Engine backend. </dd></dl>
</div>
</div>
<a id="ga7faea56041d10c71dbbd6746ca854197"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7faea56041d10c71dbbd6746ca854197">◆ </a></span>readNetFromONNX() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromONNX </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>onnxFile</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromONNX(</td><td class="paramname">onnxFile</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromONNX(</td><td class="paramname">buffer</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model <a href="https://onnx.ai/">ONNX</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">onnxFile</td><td>path to the .onnx file with text description of the network architecture. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Network object that ready to do forward, throw an exception in failure cases. </dd></dl>
</div>
</div>
<a id="ga9198ecaac7c32ddf0aa7a1bcbd359567"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9198ecaac7c32ddf0aa7a1bcbd359567">◆ </a></span>readNetFromONNX() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromONNX </td>
          <td>(</td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>sizeBuffer</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromONNX(</td><td class="paramname">onnxFile</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromONNX(</td><td class="paramname">buffer</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>memory address of the first byte of the buffer. </td></tr>
    <tr><td class="paramname">sizeBuffer</td><td>size of the buffer. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Network object that ready to do forward, throw an exception in failure cases. </dd></dl>
</div>
</div>
<a id="gac1a00e8bae54070e5837c15b1482997d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac1a00e8bae54070e5837c15b1482997d">◆ </a></span>readNetFromONNX() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromONNX </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>buffer</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromONNX(</td><td class="paramname">onnxFile</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromONNX(</td><td class="paramname">buffer</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model from <a href="https://onnx.ai/">ONNX</a> in-memory buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">buffer</td><td>in-memory buffer that stores the ONNX model bytes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Network object that ready to do forward, throw an exception in failure cases. </dd></dl>
</div>
</div>
<a id="gad820b280978d06773234ba6841e77e8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad820b280978d06773234ba6841e77e8d">◆ </a></span>readNetFromTensorflow() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromTensorflow </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>config</em> = <code><a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTensorflow(</td><td class="paramname">model[, config]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTensorflow(</td><td class="paramname">bufferModel[, bufferConfig]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">model</td><td>path to the .pb file with binary protobuf description of the network architecture </td></tr>
    <tr><td class="paramname">config</td><td>path to the .pbtxt file that contains text graph definition in protobuf format. Resulting <a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object is built by text graph using weights from a binary one that let us make it more flexible. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="gac9b3890caab2f84790a17b306f36bd57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac9b3890caab2f84790a17b306f36bd57">◆ </a></span>readNetFromTensorflow() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromTensorflow </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferModel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt; &amp; </td>
          <td class="paramname"><em>bufferConfig</em> = <code>std::vector&lt; <a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga65f85814a8290f9797005d3b28e7e5fc">uchar</a> &gt;()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTensorflow(</td><td class="paramname">model[, config]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTensorflow(</td><td class="paramname">bufferModel[, bufferConfig]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bufferModel</td><td>buffer containing the content of the pb file </td></tr>
    <tr><td class="paramname">bufferConfig</td><td>buffer containing the content of the pbtxt file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object. </dd></dl>
</div>
</div>
<a id="gacdba30a7c20db2788efbf5bb16a7884d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacdba30a7c20db2788efbf5bb16a7884d">◆ </a></span>readNetFromTensorflow() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromTensorflow </td>
          <td>(</td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>bufferModel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>lenModel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char * </td>
          <td class="paramname"><em>bufferConfig</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t </td>
          <td class="paramname"><em>lenConfig</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTensorflow(</td><td class="paramname">model[, config]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTensorflow(</td><td class="paramname">bufferModel[, bufferConfig]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="https://www.tensorflow.org/">TensorFlow</a> framework's format. </p>
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bufferModel</td><td>buffer containing the content of the pb file </td></tr>
    <tr><td class="paramname">lenModel</td><td>length of bufferModel </td></tr>
    <tr><td class="paramname">bufferConfig</td><td>buffer containing the content of the pbtxt file </td></tr>
    <tr><td class="paramname">lenConfig</td><td>length of bufferConfig </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga65a1da76cb7d6852bdf7abbd96f19084"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga65a1da76cb7d6852bdf7abbd96f19084">◆ </a></span>readNetFromTorch()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html">Net</a> cv::dnn::readNetFromTorch </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>isBinary</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>evaluate</em> = <code>true</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readNetFromTorch(</td><td class="paramname">model[, isBinary[, evaluate]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Reads a network model stored in <a href="http://torch.ch">Torch7</a> framework's format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">model</td><td>path to the file, dumped from Torch by using torch.save() function. </td></tr>
    <tr><td class="paramname">isBinary</td><td>specifies whether the network was serialized in ascii mode or binary. </td></tr>
    <tr><td class="paramname">evaluate</td><td>specifies testing phase of network. If true, it's similar to evaluate() method in Torch. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../db/d30/classcv_1_1dnn_1_1Net.html" title="This class allows to create and manipulate comprehensive artificial neural networks. ">Net</a> object.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Ascii mode of Torch serializer is more preferable, because binary mode extensively use <code>long</code> type of C language, which has various bit-length on different systems.</dd></dl>
<p>The loading file must contain serialized <a href="https://github.com/torch/nn/blob/master/doc/module.md">nn.Module</a> object with importing network. Try to eliminate a custom objects from serialazing data to avoid importing errors.</p>
<p>List of supported layers (i.e. object instances derived from Torch nn.Module class):</p><ul>
<li>nn.Sequential</li>
<li>nn.Parallel</li>
<li>nn.Concat</li>
<li>nn.Linear</li>
<li>nn.SpatialConvolution</li>
<li>nn.SpatialMaxPooling, nn.SpatialAveragePooling</li>
<li>nn.ReLU, nn.TanH, nn.Sigmoid</li>
<li>nn.Reshape</li>
<li>nn.SoftMax, nn.LogSoftMax</li>
</ul>
<p>Also some equivalents of these classes from cunn, cudnn, and fbcunn may be successfully imported. </p>
</div>
</div>
<a id="ga8fe873b1b4746c3ceee80bebb16605d5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga8fe873b1b4746c3ceee80bebb16605d5">◆ </a></span>readTensorFromONNX()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::dnn::readTensorFromONNX </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readTensorFromONNX(</td><td class="paramname">path</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Creates blob from .pb file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">path</td><td>to the .pb file with input tensor. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="../../d3/d63/classcv_1_1Mat.html" title="n-dimensional dense array class ">Mat</a>. </dd></dl>
</div>
</div>
<a id="ga70a86067eed7e495865cedc175ddba09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga70a86067eed7e495865cedc175ddba09">◆ </a></span>readTorchBlob()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::dnn::readTorchBlob </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool </td>
          <td class="paramname"><em>isBinary</em> = <code>true</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.dnn.readTorchBlob(</td><td class="paramname">filename[, isBinary]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Loads blob which was serialized as torch.Tensor object of Torch7 framework. </p>
<dl class="section warning"><dt>Warning</dt><dd>This function has the same limitations as <a class="el" href="../../d6/d0f/group__dnn.html#ga65a1da76cb7d6852bdf7abbd96f19084" title="Reads a network model stored in Torch7 framework's format. ">readNetFromTorch()</a>. </dd></dl>
</div>
</div>
<a id="ga5de8769f48b44f631c1767b1700069fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5de8769f48b44f631c1767b1700069fa">◆ </a></span>shrinkCaffeModel()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::shrinkCaffeModel </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &gt; &amp; </td>
          <td class="paramname"><em>layersTypes</em> = <code>std::vector&lt; <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &gt;()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn.shrinkCaffeModel(</td><td class="paramname">src, dst[, layersTypes]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Convert all weights of Caffe network to half precision floating point. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Path to origin model from Caffe framework contains single precision floating point weights (usually has <code>.caffemodel</code> extension). </td></tr>
    <tr><td class="paramname">dst</td><td>Path to destination model with updated weights. </td></tr>
    <tr><td class="paramname">layersTypes</td><td>Set of layers types which parameters will be converted. By default, converts only Convolutional and Fully-Connected layers' weights.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Shrinked model has no origin float32 weights so it can't be used in origin Caffe framework anymore. However the structure of data is taken from NVidia's Caffe fork: <a href="https://github.com/NVIDIA/caffe">https://github.com/NVIDIA/caffe</a>. So the resulting model may be used there. </dd></dl>
</div>
</div>
<a id="ga0c3f216f5f858efdef44b68636133dff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0c3f216f5f858efdef44b68636133dff">◆ </a></span>writeTextGraph()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::dnn::writeTextGraph </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>model</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga1f6634802eeadfd7245bc75cf3e216c2">String</a> &amp; </td>
          <td class="paramname"><em>output</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.dnn.writeTextGraph(</td><td class="paramname">model, output</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../db/ddc/dnn_2dnn_8hpp.html">opencv2/dnn/dnn.hpp</a>&gt;</code></p>
<p>Create a text representation for a binary network stored in protocol buffer format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>A path to binary network. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output</td><td>A path to output text file to be created.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>To reduce output file size, trained weights are not included. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
